import React, { useEffect, useState } from 'react'
import { Button } from 'antd';
import { connect } from 'dva';
import OpenSeaDragon from "openseadragon";
// import './outcome.css'
const theProps = (state) => {
    return {
        mapsId: state.maps.mapsId
    }
}
function Download(props) {
    const { mapsId, dispatch } = props;
    console.log(mapsId)
    console.log(props)
    
    const downloadMine = () => {
        let newPayload = {
            id: mapsId,
            type: 2
        }
        dispatch({
            type: 'echarts/downloadFile',
            payload: newPayload
        })
    }
    return (
        <>
            
                    <Button type="primary" onClick={downloadMine}>
                        开始下载矿物分析
                    </Button>
            
        </>
    )
}
export default connect(theProps, null)(Download)
